from core.basic.character import Character, equipment, 武器强化计算, 锻造计算
from core.basic.skill import 主动技能, 被动技能
# class 主动技能(主动技能):
#     def 等效CD(self, 武器类型, 输出类型):
#         if 武器类型 == '矛':
#             return round(self.CDR / self.恢复 * 1.05, 1)
#         if 武器类型 == '棍棒':
#             return round(self.CDR / self.恢复 * 0.95, 1)


class 技能0(主动技能):
    名称 = '基本攻击'
    备注 = '(一轮,TP为基础精通)'
    所在等级 = 1
    等级上限 = 1
    基础等级 = 1
    data0 = [0, 152+182+274]
    # 基础 = 225.2*2.662/1.115*1.1
    # 基础2 = 1.16 * 225.2*2.662/1.115*1.1
    # 基础3 = 1.8 * 225.2*2.662/1.115*1.1
    形态 = ['普通', '变身']
    CD = 1
    TP成长 = 0.10
    TP上限 = 5
    # 加强
    倍率 = 1.127

    def 形态变更(self, 形态, char: Character):
        if (形态 == '' or 形态 not in self.形态) and len(self.形态) > 0:
            形态 = self.形态[0]
        if 形态 == "普通":
            self.data0 = [0, 152+182+274]
        if 形态 == "变身":
            self.data0 = [0, 149+177+267]


class 技能1(被动技能):
    名称 = '基础精通'
    倍率 = 1.0
    所在等级 = 1
    等级上限 = 200
    学习间隔 = 1
    等级精通 = 110
    关联技能 = ['基本攻击','炫纹发射']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(self.倍率 * (0.463 + 0.089 * self.等级), 5)


class 技能2(被动技能):
    名称 = '尼巫的战斗术'
    所在等级 = 15
    等级上限 = 11
    等级精通 = 1

    关联技能 = ['所有']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.18+0.02*self.等级, 3)


class 技能3(被动技能):
    名称 = '炫纹'
    所在等级 = 15
    等级上限 = 60
    学习间隔 = 2
    等级精通 = 50

    关联技能 = ['所有']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.20+0.00*self.等级, 3)


class 技能4(被动技能):
    名称 = '战斗法师武器精通'
    所在等级 = 20
    等级上限 = 30
    学习间隔 = 3
    等级精通 = 20
    冷却关联技能 = ['所有']
    非冷却关联技能 = ['星纹陨爆', '一骑当千碎霸', '太古星河·殒灭']


    def 物理攻击力倍率(self, 武器类型):
        if self.等级 == 0 or (武器类型 != '矛' and 武器类型 != '棍棒'):
            return 1.0
        if self.等级 <= 20:
            return round(1.00+0.01*self.等级, 3)
        if self.等级 > 20:
            return round(0.80+0.02*self.等级, 3)

    def 魔法攻击力倍率(self, 武器类型):
        if self.等级 == 0 or (武器类型 != '矛' and 武器类型 != '棍棒'):
            return 1.0
        if self.等级 <= 20:
            return round(1.00+0.01*self.等级, 3)
        if self.等级 > 20:
            return round(0.80+0.02*self.等级, 3)

    def CD缩减倍率(self, 武器类型):
        if self.等级 == 0 or 武器类型 != '棍棒':
            return 1.0
        else:
            return 0.95

class 技能5(主动技能):
    名称 = '炫纹发射'
    备注 = '(个数,TP为强化炫纹)'
    所在等级 = 15
    等级上限 = 11
    学习间隔 = 2
    等级精通 = 1
    无色消耗 = 0
    data0 = [0, 235, 240, 245, 250, 254, 259, 265, 270, 275, 281, 286]
    hit0 = 1
    TP成长 = 0.1
    TP上限 = 5 #基础精通TP
    MP = [12, 140]
    CD = 0.5

    def 等效CD(self, **argv):
        return 0.5

class 技能6(主动技能):
    名称 = "双重锤击"
    所在等级 = 20
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 8
    MP = [60, 546]
    无色消耗 = 0
    data0 = [0, 637, 703, 773, 838, 901, 967, 1033, 1099, 1165, 1231, 1294, 1358, 1429, 1495, 1560, 1632, 1699, 1762, 1827, 1895, 1959, 2026, 2091, 2156, 2220, 2290, 2355, 2420, 2486, 2554, 2618, 2681, 2747, 2813, 2882, 2947, 3014, 3077, 3143, 3211, 3275, 3341, 3409, 3467, 3544, 3607, 3673, 3742, 3808, 3875, 3938, 4006, 4071, 4135, 4201, 4269, 4333, 4401, 4466, 4531, 4595, 4663, 4730, 4793, 4856, 4927, 4991, 5058, 5123, 5188]
    hit0 = 1
    data1 = [0, 2341, 2585, 2822, 3065, 3308, 3551, 3792, 4036, 4273, 4518, 4761, 5003, 5242, 5487, 5727, 5972, 6214, 6449, 6696, 6938, 7179, 7424, 7664, 7903, 8148, 8390, 8633, 8873, 9116, 9355, 9600, 9841, 10083, 10326, 10566, 10812, 11057, 11291, 11534, 11777, 12022, 12266, 12502, 12743, 12990, 13233, 13468, 13712, 13953, 14199, 14443, 14679, 14921, 15166, 15412, 15652, 15888, 16133, 16375, 16619, 16865, 17097, 17342, 17590, 17828, 18072, 18311, 18553, 18794, 19042]
    hit1 = 1
    data2 = [0, 1789, 1969, 2156, 2341, 2526, 2711, 2892, 3077, 3263, 3454, 3634, 3822, 4006, 4187, 4374, 4556, 4742, 4927, 5111, 5295, 5479, 5670, 5852, 6042, 6223, 6405, 6590, 6773, 6964, 7146, 7324, 7515, 7695, 7888, 8072, 8250, 8439, 8621, 8806, 8991, 9181, 9360, 9545, 9731, 9908, 10106, 10287, 10466, 10657, 10840, 11025, 11209, 11397, 11573, 11762, 11949, 12131, 12323, 12505, 12682, 12876, 13057, 13239, 13425, 13606, 13795, 13977, 14165, 14348, 14540]
    hit2 = 1
    TP成长 = 0.1
    TP上限 = 7


class 技能7(主动技能):
    名称 = "炫纹爆弹"
    所在等级 = 25
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 12
    MP = [60, 546]
    无色消耗 = 0
    data0 = [0, 1648, 1823, 1987, 2164, 2347, 2503, 2688, 2854, 3025, 3193, 3363, 3531, 3709, 3870, 4047, 4215, 4384, 4552, 4720, 4893, 5073, 5232, 5414, 5595, 5752, 5937, 6105, 6274, 6442, 6612, 6782, 6957, 7118, 7294, 7464, 7634, 7803, 7973, 8141, 8325, 8481, 8665, 8841, 9002, 9176, 9339, 9516, 9686, 9855, 10022, 10191, 10361, 10544, 10711, 10883, 11053, 11222, 11390, 11576, 11743, 11912, 12081, 12254, 12420, 12588, 12763, 12934, 13102, 13274, 13440]
    hit0 = 1
    data1 = [0, 382, 416, 455, 497, 550, 588, 625, 657, 707, 735, 772, 840, 864, 898, 915, 980, 1022, 1048, 1114, 1123, 1180, 1217, 1257, 1295, 1341, 1391, 1400, 1467, 1492, 1535, 1593, 1614, 1650, 1672, 1738, 1780, 1807, 1859, 1880, 1922, 1962, 2017, 2054, 2094, 2137, 2162, 2223, 2240, 2281, 2344, 2372, 2405, 2446, 2487, 2539, 2581, 2593, 2644, 2686, 2720, 2762, 2804, 2854, 2894, 2931, 2974, 2997, 3036, 3075, 3119]
    hit1 = 7
    data2 = [0, 4962, 5470, 5978, 6500, 7011, 7522, 8030, 8551, 9064, 9565, 10081, 10601, 11109, 11630, 12136, 12651, 13175, 13670, 14188, 14695, 15209, 15721, 16240, 16764, 17269, 17776, 18290, 18811, 19308, 19828, 20343, 20849, 21369, 21879, 22401, 22915, 23415, 23929, 24439, 24961, 25467, 25981, 26502, 27010, 27518, 28026, 28554, 29052, 29568, 30087, 30600, 31115, 31621, 32127, 32650, 33156, 33676, 34187, 34701, 35207, 35726, 36239, 36754, 37258, 37779, 38286, 38810, 39317, 39826, 40338]
    hit2 = 1
    TP成长 = 0.1
    TP上限 = 7


class 技能8(主动技能):
    名称 = "碎霸"
    所在等级 = 30
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 8
    MP = [60, 546]
    无色消耗 = 0
    data0 = [0, 6007, 6626, 7251, 7870, 8489, 9106, 9728, 10353, 10974, 11594, 12217, 12839, 13461, 14083, 14706, 15320, 15942, 16561, 17183, 17810, 18429, 19050, 19671, 20294, 20918, 21533, 22151, 22775, 23395, 24019, 24639, 25263, 25885, 26506, 27122, 27741, 28363, 28988, 29611, 30230, 30851, 31478, 32095, 32719, 33334, 33954, 34578, 35196, 35819, 36444, 37065, 37685, 38305, 38932, 39545, 40170, 40788, 41410, 42033, 42654, 43278, 43899, 44521, 45135, 45757, 46380, 46999, 47624, 48243, 48865]
    hit0 = 1
    TP成长 = 0.1
    TP上限 = 7


class 技能9(主动技能):
    名称 = "超级炫纹"
    所在等级 = 30
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 8
    MP = [25, 210]
    无色消耗 = 0
    data0 = [0, 6532, 7193, 7856, 8518, 9181, 9841, 10504, 11166, 11827, 12495, 13157, 13819, 14479, 15142, 15808, 16467, 17132, 17792, 18454, 19117, 19780, 20442, 21104, 21766, 22431, 23094, 23755, 24418, 25082, 25743, 26406, 27067, 27729, 28393, 29056, 29717, 30380, 31042, 31708, 32370, 33031, 33694, 34355, 35019, 35680, 36343, 37005, 37667, 38332, 38993, 39656, 40318, 40983, 41645, 42306, 42970, 43630, 44295, 44956, 45619, 46282, 46943, 47607, 48268, 48933, 49594, 50257, 50921, 51582, 52245]
    hit0 = 1
    TP成长 = 0.1
    TP上限 = 7

    def 等效百分比(self, **argv):
        # 不携带强压护石时，炫纹上限9个，每个增加炫纹1%伤害，1个自动发射，携带强压护石，上限10个
        char = argv.get('char', {})
        return super().等效百分比(**argv) * (1.1 if '炫纹强压' in char.护石栏 else 1.08)

class 技能10(主动技能):
    名称 = "流星闪影击"
    所在等级 = 35
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 20
    MP = [180, 1512]
    无色消耗 = 1
    data0 = [0, 14744, 16239, 17737, 19232, 20728, 22228, 23716, 25220, 26719, 28203, 29701, 31201, 32697, 34188, 35689, 37177, 38676, 40168, 41670, 43170, 44664, 46156, 47654, 49151, 50650, 52147, 53631, 55132, 56631, 58126, 59624, 61121, 62612, 64108, 65598, 67100, 68596, 70093, 71580, 73082, 74580, 76075, 77576, 79069, 80561, 82059, 83556, 85052, 86544, 88041, 89536, 91032, 92532, 94028, 95526, 97011, 98509, 100010, 101504, 103004, 104496, 105991, 107487, 108986, 110481, 111976, 113473, 114964, 116462, 117957]
    hit0 = 1
    data1 = [0, 109, 120, 128, 136, 144, 156, 173, 182, 198, 202, 212, 224, 236, 245, 262, 263, 274, 292, 301, 315, 325, 331, 344, 355, 360, 382, 385, 395, 410, 417, 435, 441, 445, 464, 475, 480, 497, 507, 509, 526, 534, 550, 561, 571, 580, 590, 599, 615, 626, 630, 642, 656, 668, 678, 689, 699, 711, 719, 732, 743, 757, 759, 771, 782, 796, 810, 821, 824, 836, 850]
    hit1 = 0
    TP成长 = 0.1
    TP上限 = 5

    形态 = ['打满', '秒C']

    def TP加成(self):
        return 1

    def 形态变更(self, 形态, char: Character):
        if (形态 == '' or 形态 not in self.形态) and len(self.形态) > 0:
            形态 = self.形态[0]
        if 形态 == "打满":
            self.hit0 = 1
            self.hit1 = 15
            self.hit1 += self.TP等级
            self.power0 = 1 + self.TP成长 * self.TP等级
        if 形态 == "秒C":
            self.hit0 = 1
            self.hit1 = 0
            self.power0 = 1 + self.TP成长 * self.TP等级


class 技能11(主动技能):
    名称 = "炫纹强压"
    所在等级 = 35
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 17
    MP = [300, 1260]
    无色消耗 = 1
    data0 = [0, 13678, 15067, 16454, 17842, 19231, 20620, 22005, 23393, 24781, 26169, 27557, 28944, 30333, 31719, 33107, 34496, 35884, 37270, 38658, 40046, 41434, 42820, 44209, 45597, 46985, 48373, 49761, 51147, 52535, 53923, 55312, 56700, 58085, 59474, 60862, 62250, 63639, 65027, 66415, 67801, 69189, 70578, 71966, 73352, 74741, 76129, 77515, 78903, 80292, 81681, 83068, 84456, 85845, 87232, 88620, 90007, 91395, 92782, 94170, 95558, 96946, 98333, 99721, 101110, 102498, 103883, 105271, 106660, 108048, 109436]
    hit0 = 1
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        self.倍率 *= 1.31
        self.CDR *= 0.92


class 技能12(主动技能):
    名称 = "强袭流星打"
    所在等级 = 40
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 25
    MP = [160, 1344]
    无色消耗 = 1
    data0 = [0, 16862, 18612, 20358, 22090, 23834, 25585, 27330, 29077, 30817, 32572, 34310, 36041, 37797, 39539, 41292, 43026, 44763, 46516, 48259, 49999, 51752, 53488, 55242, 56978, 58721, 60476, 62217, 63951, 65701, 67440, 69195, 70939, 72671, 74426, 76165, 77920, 79653, 81397, 83153, 84888, 86620, 88375, 90115, 91873, 93604, 95349, 97104, 98840, 100583, 102330, 104069, 105821, 107562, 109305, 111055, 112799, 114534, 116282, 118028, 119781, 121521, 123251, 125002, 126753, 128497, 130232, 131979, 133728, 135473, 137213]
    hit0 = 1
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        self.倍率 *= 1.05*1.22


class 技能13(主动技能):
    名称 = "煌龙偃月"
    所在等级 = 45
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 45
    MP = [360, 3024]
    无色消耗 = 2
    data0 = [0, 6706, 7394, 8097, 8785, 9480, 10170, 10866, 11555, 12257, 12947, 13639, 14334, 15025, 15718, 16417, 17109, 17805, 18493, 19186, 19882, 20576, 21266, 21964, 22656, 23346, 24045, 24737, 25430, 26128, 26819, 27504, 28208, 28896, 29589, 30286, 30976, 31666, 32370, 33060, 33751, 34443, 35137, 35827, 36525, 37219, 37917, 38606, 39296, 39995, 40685, 41381, 42077, 42767, 43457, 44158, 44850, 45539, 46237, 46923, 47615, 48319, 49009, 49699, 50394, 51089, 51777, 52482, 53171, 53858, 54556]
    hit0 = 1
    data1 = [0, 2237, 2464, 2702, 2934, 3162, 3390, 3620, 3851, 4086, 4318, 4547, 4777, 5009, 5242, 5471, 5704, 5936, 6166, 6396, 6633, 6863, 7091, 7323, 7552, 7780, 8018, 8248, 8477, 8706, 8942, 9171, 9404, 9635, 9862, 10096, 10325, 10557, 10789, 11023, 11251, 11480, 11713, 11942, 12176, 12409, 12637, 12868, 13096, 13334, 13571, 13795, 14026, 14256, 14487, 14719, 14952, 15181, 15410, 15641, 15872, 16106, 16337, 16568, 16800, 17032, 17258, 17495, 17725, 17958, 18186]
    hit1 = 7
    data2 = [0, 9589, 10576, 11573, 12565, 13552, 14547, 15540, 16524, 17523, 18513, 19500, 20502, 21489, 22472, 23471, 24462, 25454, 26444, 27437, 28428, 29419, 30408, 31407, 32399, 33382, 34382, 35371, 36356, 37358, 38348, 39332, 40332, 41322, 42304, 43304, 44294, 45280, 46287, 47270, 48259, 49263, 50244, 51233, 52232, 53220, 54219, 55205, 56194, 57194, 58181, 59170, 60172, 61157, 62148, 63146, 64133, 65124, 66121, 67109, 68098, 69090, 70080, 71072, 72062, 73055, 74044, 75038, 76024, 77019, 78018]
    hit2 = 1
    data3 = [0, 2278, 2511, 2741, 2973, 3202, 3435, 3667, 3897, 4130, 4359, 4592, 4822, 5054, 5284, 5517, 5747, 5978, 6211, 6442, 6673, 6903, 7135, 7366, 7599, 7827, 8061, 8290, 8523, 8755, 8986, 9215, 9449, 9679, 9908, 10142, 10372, 10604, 10834, 11066, 11298, 11530, 11759, 11994, 12223, 12453, 12685, 12916, 13148, 13379, 13611, 13839, 14074, 14305, 14535, 14768, 14998, 15229, 15459, 15691, 15923, 16154, 16385, 16617, 16849, 17080, 17311, 17542, 17772, 18004, 18235]
    hit3 = 0
    data4 = [0, 17096, 18830, 20563, 22299, 24034, 25769, 27503, 29238, 30970, 32704, 34439, 36173, 37911, 39644, 41380, 43114, 44845, 46580, 48314, 50050, 51785, 53521, 55254, 56990, 58723, 60455, 62191, 63924, 65660, 67395, 69130, 70864, 72597, 74331, 76065, 77800, 79534, 81271, 83005, 84740, 86474, 88207, 89941, 91675, 93410, 95145, 96882, 98614, 100347, 102084, 103815, 105553, 107286, 109021, 110756, 112491, 114225, 115958, 117693, 119427, 121161, 122895, 124632, 126366, 128100, 129835, 131568, 133303, 135037, 136771]
    hit4 = 0
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1

    def 形态变更(self, 形态, char: Character):
        if char.get_skill_by_name("煌龙乱舞").等级 > 0:
            self.hit0 = 0
            self.hit1 = 0
            self.hit2 = 0
            self.hit3 = 5
            self.hit4 = 1
            if '煌龙偃月' in char.护石栏:
                self.hit3 += 1
                self.power3 = 1.14
                self.power4 = 1.18
        else:
            self.hit0 = 1
            self.hit1 = 7
            self.hit2 = 1
            self.hit3 = 0
            self.hit4 = 0
            if '煌龙偃月' in char.护石栏:
                self.hit1 += 3
                self.power2 = 1.36

    def 装备护石(self, char):
        pass


class 技能14(被动技能):
    名称 = '煌龙乱舞'
    所在等级 = 45
    等级上限 = 1
    学习间隔 = 2
    等级精通 = 1


class 技能15(被动技能):
    名称 = '斗神意志'
    所在等级 = 48
    等级上限 = 50
    学习间隔 = 3
    等级精通 = 40

    关联技能 = ['所有']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.05+0.02*self.等级, 3)


class 技能16(主动技能):
    名称 = "星纹陨爆"
    所在等级 = 50
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40
    CD = 145
    MP = [1500, 3500]
    无色消耗 = 7
    data0 = [0, 88105, 108532, 128962, 149391, 169823, 190253, 210682, 231114, 276696, 299168, 321642, 344116, 366588, 389061, 411534, 434007, 456478, 478953, 501425, 523899, 546373, 568845, 591317, 613788, 636263, 658736, 681209, 703683, 726154, 748628, 771102, 793575, 816046, 838519, 860992, 883465, 905938, 928412, 950884, 973357, 995831, 1018303, 1040775, 1063248, 1085723, 1108195, 1130666, 1153141, 1175612, 1198086]
    hit0 = 1



class 技能17(主动技能):
    名称 = "闪击碎霸"
    所在等级 = 60
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 30
    MP = [400, 1120]
    无色消耗 = 2
    data0 = [0, 26327, 28996, 31665, 34337, 37011, 39686, 42351, 45024, 47693, 50365, 53033, 55706, 58378, 61049, 63717, 66391, 69065, 71733, 74403, 77074, 79747, 82419, 85082, 87757, 90433, 93094, 95767, 98443, 101113, 103779, 106450, 109124, 111795, 114461, 117132, 119810, 122478, 125147, 127819, 130494, 133162, 135833, 138503, 141175, 143849, 146513, 149186, 151859, 154523, 157196]
    hit0 = 1
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        self.倍率 *= 1.24
        self.CDR *= 0.90


class 技能18(主动技能):
    名称 = "煌龙降临"
    所在等级 = 70
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 50
    MP = [800, 1680]
    无色消耗 = 3
    data0 = [0, 49688, 54612, 59492, 64401, 69235, 74073, 78986, 83881, 88724, 93653, 98500, 103359, 108170, 113113, 117975, 122818, 127766, 132592, 137523, 142364, 147280, 152084, 156949, 161912, 166700, 171581, 176490, 181385, 186230, 191074, 196037, 200834, 205723, 210570, 215513, 220341, 225238, 230117, 235028, 239874, 244679, 249613, 254432, 259346, 264226, 269086, 273981, 278890, 283717, 288565]
    hit0 = 1
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        self.倍率 *= 0.695
        self.CD = 25
        self.CDR *= 0.9


class 技能19(被动技能):
    名称 = '战灵潜能'
    所在等级 = 75
    等级上限 = 50
    学习间隔 = 3
    等级精通 = 40

    关联技能 = ['所有']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.22+0.02*self.等级, 3)


class 技能20(主动技能):
    名称 = "炫纹簇"
    所在等级 = 75
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 45
    MP = [360, 3024]
    无色消耗 = 5
    data0 = [0, 9174, 10105, 11036, 11968, 12900, 13830, 14762, 15691, 16623, 17554, 18484, 19414, 20343, 21273, 22204, 23138, 24067, 25000, 25929, 26860, 27790, 28723, 29655, 30584, 31517, 32446, 33378, 34310, 35240, 36170, 37099, 38031, 38962, 39894, 40824, 41756, 42687, 43617, 44548, 45478, 46411, 47340, 48271, 49202, 50133, 51063, 51992, 52924, 53855, 54786]
    hit0 = 7

    是否有护石 = 1

    def 装备护石(self, char):
        self.hit0 = 1
        self.倍率 *= 1+6.95+1.25


class 技能21(主动技能):
    名称 = "使徒之舞"
    所在等级 = 80
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 40
    MP = [384, 3225]
    无色消耗 = 5
    data0 = [0, 2775, 3053, 3336, 3618, 3901, 4182, 4466, 4744, 5025, 5306, 5591, 5867, 6151, 6431, 6717, 6998, 7278, 7559, 7840, 8123, 8404, 8688, 8968, 9246, 9528, 9811, 10097, 10375, 10656, 10938, 11218, 11502, 11784, 12063, 12344, 12625, 12909, 13190, 13467, 13748, 14031, 14315, 14598, 14881, 15162, 15439, 15723, 16006, 16288, 16568]
    hit0 = 3
    data1 = [0, 5550, 6112, 6677, 7239, 7799, 8364, 8926, 9489, 10053, 10618, 11179, 11742, 12302, 12866, 13428, 13993, 14555, 15121, 15685, 16247, 16806, 17369, 17934, 18498, 19061, 19622, 20186, 20747, 21310, 21875, 22436, 23000, 23566, 24130, 24688, 25254, 25812, 26379, 26942, 27506, 28070, 28631, 29191, 29755, 30320, 30882, 31446, 32007, 32572, 33134]
    hit1 = 1
    data2 = [0, 55507, 61131, 66753, 72372, 77994, 83644, 89265, 94885, 100535, 106181, 111780, 117427, 123021, 128671, 134292, 139939, 145563, 151208, 156830, 162454, 168076, 173696, 179344, 184967, 190614, 196238, 201857, 207481, 213101, 218751, 224370, 229993, 235641, 241290, 246884, 252532, 258128, 263777, 269424, 275044, 280668, 286315, 291911, 297560, 303206, 308805, 314477, 320073, 325718, 331342]
    hit2 = 1

    是否有护石 = 1

    def 装备护石(self, char):
        # self.倍率 *= 1.36801
        self.hit1 = 0
        self.power2 = 0.13*10*1.2


class 技能22(主动技能):
    名称 = "一骑当千碎霸"
    所在等级 = 85
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40
    CD = 180
    MP = [2500, 8000]
    无色消耗 = 10
    data0 = [0, 191319, 235680, 280041, 324409, 368770, 413128, 457488, 501854, 546221, 590581, 634949, 679306, 723676, 768030, 812392, 856757, 901123, 945493, 989856, 1034218, 1078577, 1122941, 1167304, 1211672, 1256026, 1300395, 1344753, 1389119, 1433477, 1477846, 1522207, 1566570, 1610940, 1655291, 1699657, 1744027, 1788385, 1832751, 1877109, 1921470, 1965839, 2010202, 2054566, 2098932, 2143293, 2187657, 2232020, 2276375, 2320741, 2365104]
    hit0 = 1



class 技能23(主动技能):
    名称 = "炫纹之源：太古神光"
    所在等级 = 95
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 60
    MP = [960, 7200]
    无色消耗 = 7
    data0 = [0, 158782, 174892, 190998, 207109, 223216, 239324, 255433, 271542, 287648, 303759, 319865, 335975, 352083, 368192, 384300, 400409, 416515, 432626, 448733, 464841, 480950, 497059, 513165, 529276, 545383, 561494, 577600, 593709, 609817, 625926, 642033, 658144, 674250, 690359, 706467, 722576, 738683, 754793, 770900, 787011, 803117, 819226, 835337, 851443, 867550, 883661, 899769, 915876, 931987, 948093]
    hit0 = 1

    def 等效百分比(self, **argv):
        # 额外计算10次炫纹
        char = argv.get('char', {})
        伤害类型 = argv.get('伤害类型', '直伤')
        炫纹 = char.get_skill_by_name('炫纹发射').等效百分比(伤害类型=伤害类型)
        return super().等效百分比(**argv) + 炫纹 * 10


class 技能24(被动技能):
    名称 = '太古之力'
    所在等级 = 95
    等级上限 = 50
    学习间隔 = 3
    等级精通 = 40

    关联技能 = ['所有']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.18+0.02*self.等级, 3)


class 技能25(主动技能):
    名称 = "太古星河·殒灭"
    所在等级 = 100
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40
    CD = 290
    MP = [4025, 8055]
    无色消耗 = 15
    data0 = [0, 15373, 18937, 22502, 26067, 29632, 33198, 36762, 40327, 43891, 47456, 51020, 54585, 58151, 61716, 65280, 68845, 72410, 75975, 79540, 83105, 86669, 90234, 93799, 97363, 100928, 104494, 108059, 111623, 115188, 118752, 122317, 125883, 129447, 133013, 136577, 140142, 143706, 147271, 150837, 154401, 157966, 161530, 165095, 168660, 172226, 175791, 179354, 182920, 186484, 190050]
    hit0 = 5
    data1 = [0, 25622, 31562, 37504, 43445, 49386, 55330, 61270, 67211, 73152, 79094, 85034, 90976, 96919, 102859, 108801, 114742, 120683, 126624, 132567, 138509, 144449, 150390, 156331, 162272, 168214, 174156, 180099, 186039, 191979, 197921, 203862, 209806, 215745, 221688, 227628, 233570, 239510, 245451, 251395, 257335, 263277, 269217, 275159, 281100, 287043, 292985, 298924, 304867, 310807, 316749]
    hit1 = 1
    data2 = [0, 51244, 63124, 75007, 86890, 98772, 110659, 122539, 134422, 146304, 158188, 170068, 181951, 193838, 205718, 217601, 229483, 241367, 253249, 265134, 277018, 288897, 300779, 312663, 324545, 336427, 348313, 360197, 372078, 383958, 395841, 407724, 419611, 431491, 443376, 455257, 467139, 479020, 490902, 502789, 514670, 526555, 538435, 550318, 562201, 574086, 585971, 597848, 609734, 621614, 633499]
    hit2 = 1
    data3 = [0, 76866, 94686, 112511, 130334, 148158, 165989, 183809, 201633, 219456, 237282, 255102, 272927, 290757, 308578, 326402, 344225, 362050, 379873, 397701, 415527, 433346, 451169, 468994, 486817, 504641, 522469, 540296, 558117, 575938, 593762, 611586, 629417, 647236, 665064, 682885, 700709, 718530, 736353, 754184, 772005, 789832, 807652, 825477, 843301, 861128, 878956, 896772, 914601, 932421, 950248]
    hit3 = 1
    data4 = [0, 18790, 23145, 27503, 31860, 36216, 40575, 44931, 49288, 53645, 58002, 62358, 66715, 71074, 75430, 79787, 84144, 88501, 92858, 97216, 101573, 105929, 110286, 114643, 119000, 123357, 127715, 132072, 136429, 140785, 145142, 149499, 153857, 158213, 162571, 166927, 171284, 175641, 179997, 184356, 188712, 193070, 197426, 201783, 206140, 210498, 214856, 219211, 223569, 227925, 232283]
    hit4 = 15

class classChange(Character):
    def __init__(self, equVersion=""):
        self.实际名称 = 'battle_mage'
        self.名称 = '知源·战斗法师'
        self.角色 = '魔法师(女)'

        self.职业 = '战斗法师'
        self.武器选项 = ['矛', '棍棒']
        self.输出类型选项 = ['物理百分比', '魔法百分比']
        self.防具精通属性 = ['力量', '智力']
        self.类型 = '物理百分比'
        self.武器类型 = '矛'
        self.防具类型 = '皮甲'

        技能列表 = []
        技能序号 = {}
        i = 0
        while i >= 0:
            try:
                tem = eval('技能'+str(i)+'()')
                tem.基础等级计算()
                技能序号[tem.名称] = i
                技能列表.append(tem)
                i += 1
            except:
                i = -1

        self.技能栏 = 技能列表
        self.技能序号 = 技能序号
        self.buff = 1.85

        super().__init__(equVersion)

    def 职业特殊计算(self):
        pass

    def set_skill_info(self, info, rune_except=[], clothes_pants=[]):
        super().set_skill_info(info, clothes_pants=['魔法秀'])

    def 武器计算(self, temp: equipment) -> None:
        self.武器类型 = temp.类型
        self.基础属性加成(物理攻击力=temp.物理攻击力, 魔法攻击力=temp.魔法攻击力, 独立攻击力=temp.独立攻击力)
        info = self.打造详情.get(temp.部位, {})
        物理攻击力 = 武器强化计算(temp.等级, temp.品质, info.get('cursed_number', 0), temp.类型,
                       '物理')
        魔法攻击力 = 武器强化计算(temp.等级, temp.品质, info.get('cursed_number', 0), temp.类型,
                       '物理')
        独立攻击力 = 锻造计算(temp.等级, temp.品质, info.get('dz_number', 0))

        self.打造['武器']['强化攻击力'] = [物理攻击力, 魔法攻击力, 0]

        self.打造['武器']['锻造加成'][0] = 独立攻击力

        self.基础属性加成(物理攻击力=物理攻击力, 魔法攻击力=魔法攻击力, 独立攻击力=独立攻击力)

    def set_individuation(self, info):
        info['char_optiopns'] = [
            {
                "name": "三觉变身(影响异常抗性)",
                "option": ["否", "是"]
            }
        ]

    # 抗性有成长的较为特殊 需要按照以下进行添加
    def 职业特殊设置(self):
        for 类型 in ['冰冻', '减速', '眩晕', '诅咒', '失明', '石化', '睡眠', '混乱', '束缚']:
            self.异常抗性加成(类型, 0.5*self.get_individuation(0), mode=0)
